package com.example.demo.service.impl;



import com.example.demo.domain.Menu;
import com.example.demo.domain.RoleMenu;
import com.example.demo.mapper.RoleMenuMapper;
import com.example.demo.service.IRoleMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleMenuServiceImpl implements IRoleMenuService {


    @Autowired
    private RoleMenuMapper roleMenuMapper;


    @Override
    public void insertRoleMenu(RoleMenu roleMenu) {
        roleMenuMapper.insertRoleMenu(roleMenu);
    }

    @Override
    public RoleMenu selectByRoleIdAndMenuId(Long menuId, Long roleId) {
        return roleMenuMapper.selectByRoleIdAndMenuId(menuId,roleId);
    }

    @Override
    public List<Menu> getMenuByRoleId(Long roleId) {
        return roleMenuMapper.getMenuByRoleId(roleId);
    }

//    @Override
//    public void delRoleMenuByRoleId(Long roleId){
//         roleMenuMapper.delRoleMenuByRoleID(roleId);
//    }
}
